package com.example.hang.msgqueue;

import android.os.Bundle;
import android.os.Message;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Toast;

public class MsgHandlerActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_msg_handler2);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
    }


    /**
     * 按钮事件
     */
    /*
    public void cal(View source){
        //Toast.makeText(HandlerUiMsgActivity.this,"你单击了按钮",Toast.LENGTH_LONG).show();
        String txt = etNum.getText().toString();
        if(txt.equals("") || txt.length() == 0){
            Toast.makeText(HandlerUiMsgActivity.this,"请输入一个数字",Toast.LENGTH_SHORT).show();
            return;
        }

        Message msg = new Message();
        msg.what = 0x123;
        Bundle bundle = new Bundle();
        bundle.putInt(Utility.UPPER_NUM,Integer.parseInt(txt));
        msg.setData(bundle);
        calThread.mHandler.sendMessage(msg);
    }*/


}
